package org.example;

import org.example.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class ConsumerMain {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext-consumer.xml");
        context.start();
        UserService userService = context.getBean(UserService.class);
        String res = userService.login("xiaohei", "1111");
        System.out.println("res = " + res);
        System.in.read();
    }
}